package com.lgq.demo;

import com.jfinal.core.JFinal;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

/**
 * Created by liguoqing on 2016/4/22.
 */
public class App {

    public static void main(String[] args) {

        //JFinal.start("src/main/webapp", 18080, "/", 5);

        Server jettyServer = new Server(18080);
        WebAppContext wac = new WebAppContext();
        wac.setContextPath("/jFinalDemo");   // 启动时url地址栏输入的工程名
        wac.setWar("jfinal-blog-demo/src/main/webapp");
        jettyServer.setHandler(wac);
        try {
            jettyServer.start();
        } catch (Exception e) {
            e.printStackTrace();
        }


    }
}
